// header导航
import { findHeadCategory } from '@/api/home'
export default {
  namespaced: true,
  state: () => {
    return {
      categoryList: []
    }
  },
  mutations: {
    setcategory (state, value) {
      state.categoryList = value
    }
  },
  actions: {
    //   获取导航栏
    async asyncGetList (ctx) {
      const res = await findHeadCategory()
      console.log(res)
      ctx.commit('setcategory', res.result)
    }
  }

}
